<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: xwj32
  Date: 2023-05-23
  Time: 16:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/5.15.3/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/bootstrap/5.0.1/css/bootstrap.min.css">
    <jsp:include page="include/mangerheadtag.jsp"/>
    <script src="https://cdn.staticfile.org/bootstrap/5.0.1/js/bootstrap.bundle.min.js"></script>
  <style>
    body {
      background-color: #f0f2f5;
    }
    .card {
      border-radius: 10px;
      margin: 20px;
      box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    .card-header {
      border-radius: 10px 10px 0 0;
      background-color: #007bff;
      color: #fff;
    }
    .form-label {
      font-weight: 500;
    }
    .form-input {
      padding: .375rem .75rem;
      line-height: 1.5;
      background-color: #fff;
      border: 1px solid #ced4da;
      border-radius: .3rem;
    }
    .form-radio {
      padding-left: .5rem;
    }
    .form-check-label {
      font-weight: 500;
    }
    .form-select {
      padding: .375rem .75rem;
      line-height: 1.5;
      background-color: #fff;
      border: 1px solid #ced4da;
      border-radius: .3rem;
    }
    .form-text {
      font-size: 80%;
    }
    .btn-cancel {
      background-color: #ff5050;
      border-color: #ff5050;
    }
    .btn-cancel:hover {
      background-color: #e00000;
      border-color: #e00000;
    }
    .status-label {
      border-radius: 10px;
      padding: 5px 10px;
      font-weight: 500;
    }
    .status-success {
      background-color: #28a745;
      color: #fff;
    }
    .status-warning {
      background-color: #ffc107;
      color: #212529;
    }
    .status-danger {
      background-color: #dc3545;
      color: #fff;
    }
    .status-pending {
      background-color: #007bff;
      color: #fff;
    }
    .queue-label {
      border-radius: 10px;
      padding: 5px 10px;
      font-weight: 500;
      background-color: #007bff;
      color: #fff;
    }
  </style>
</head>
<body>

<jsp:include page="include/appointmentHead.jsp"/>
<jsp:include page="include/menu.jsp"/>

<div class="container mt-5" style="margin-left: 283px;margin-top: 100px">
    <c:forEach items="${sessionScope.PatientCheckRecords}" var="record" >
  <div class="card" style="margin-top: 50px">
    <div class="card-header">
      <h4 class="mb-0">预约检查记录单</h4>
    </div>
    <div class="card-body">
      <div class="row mb-3">
        <label for="input-name" class="col-sm-2 col-form-label form-label">病人姓名</label>
        <div class="col-sm-4">
          <input type="text" class="form-control form-input" id="input-name" value="${record.patient_name}" readonly>
        </div>
        <label for="input-phone" class="col-sm-2 col-form-label form-label">病人电话</label>
        <div class="col-sm-4">
          <input type="tel" class="form-control form-input" id="input-phone" value="138****8888" readonly>
        </div>
      </div>
      <div class="row mb-3">
        <label for="input-id" class="col-sm-2 col-form-label form-label">身份证号</label>
        <div class="col-sm-4">
          <input type="text" class="form-control form-input" id="input-id" value="${record.idNumber}" readonly>
        </div>
        <label for="input-gender" class="col-sm-2 col-form-label form-label">病人性别</label>
        <div class="col-sm-4">
          <input type="text" id="input-gender" class="form-control form-input" value="${record.patient_gender}" readonly>
        </div>
      </div>
      <div class="row mb-3">
        <label for="input-age" class="col-sm-2 col-form-label form-label">病人年龄</label>
        <div class="col-sm-4">
          <input type="text" class="form-control form-input" id="input-age" value="${record.patient_age}岁" readonly>
        </div>
        <label for="input-check" class="col-sm-2 col-form-label form-label">检查名称</label>
        <div class="col-sm-4">
          <input type="text" class="form-control form-input" id="input-check" value="${record.examination_name}" readonly>
        </div>
      </div>
      <div class="row mb-3">
        <label for="input-history" class="col-sm-2 col-form-label form-label">初步诊断/病史</label>
        <div class="col-sm-10">
            <textarea class="form-control form-input" id="input-history" rows="3" readonly>头痛、头晕、视力模糊，伴有记忆力下降的症状</textarea>
                </div>
            </div>
            <div class="row mb-3">
                <label for="input-med" class="col-sm-2 col-form-label form-label">辅助用药信息</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control form-input" id="input-med" value="${record.check.drug}" readonly>
                </div>
            </div>
            <div class="row mb-3">
                <label for="input-doctor" class="col-sm-2 col-form-label form-label">检查医生</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control form-input" id="input-doctor" value="${record.doctor_name}" readonly>
                </div>
                <label for="input-room" class="col-sm-2 col-form-label form-label">检查室</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control form-input" id="input-room" value="${record.check.checkRoom}" readonly>
                </div>
            </div>
            <div class="row mb-3">
                <label for="input-time" class="col-sm-2 col-form-label form-label">预约时间</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control form-input" id="input-time" value="${record.created_time}" readonly>
                </div>
                <label for="input-queue" class="col-sm-2 col-form-label form-label">排队序号</label>
                <div class="col-sm-4">
                    <span id="input-queue" class="queue-label">${record.serialnumber}</span>
                </div>
            </div>
            <div class="row mb-5">
                <label for="input-wait" class="col-sm-2 col-form-label form-label">预计等待时间</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control form-input" id="input-wait" value="${ record.serialnumber * 30}分钟" readonly>
                </div>
                <label for="input-status" class="col-sm-2 col-form-label form-label">预约状态</label>
                <div class="col-sm-4">
                    <span id="input-status" class="status-label status-success">${record.appointment_status}</span>
                </div>
            </div>
            <div class="row">
                <div class="col text-end">
                    <button type="button" class="btn btn-cancel">取消预约</button>
                </div>
            </div>
        </div>
    </div>
    </c:forEach>
</div>
</body>
</html>
